<html>

<head>
<title>ADD</title>
<link type="text/css" href="jquery-ui-1.8.13.custom/css/smoothness/jquery-ui-1.8.13.custom.css" rel="Stylesheet" />	
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.13.custom/js/jquery-ui-1.8.13.custom.min.js"></script>
</head>
<body>
<script language="javascript">
function fncSubmit()
{
if(document.form1.id.value == "")
	{
	alert('Please input Id');
		document.form1.id.focus();
		return false;
	}
if(document.form1.name.value == "")
	{
		alert('Please input Name');
		document.form1.name.focus();
		return false;
	}
  
if(document.form1.surname.value == "")
	{
		alert('Please input Surname');
		document.form1.surname.focus();       
		return false;
	}	  
if(document.form1.birthdate.value == "")
	{
		alert('Please input Birth date');
		document.form1.birthdate.focus();       
		return false;
	}	
if(document.form1.bloodgroup.value == "")
	{
		alert('Please input Blood group');
		document.form1.bloodgroup.focus();       
		return false;
	}
if(document.form1.age.value == "")
	{
		alert('Please input Age');
		document.form1.age.focus();       
		return false;
	}
if(document.form1.gender.value == "")
	{
		alert('Please input Gender');
		document.form1.gender.focus();       
		return false;
	}
if(document.form1.doctorid.value == "")
	{
		alert('Please input Doctor id');
		document.form1.doctorid.focus();       
		return false;
	}	
	document.form1.submit();
}

</script>
<br/>

<br/>
<br/>
<center><h1>ADD PATIENT</h1></center>
<br/>
<center><table border=3 bordercolor="#ff99cc">
<tr><td>

<form name="form1" action="add-patients.php" method="post" onSubmit="JavaScript:return fncSubmit();">
	ID_NO: <input type="text" name="id" /><br/>
	NAME: <input type="text" name="name" /><br/>
	SURNAME: <input type="text" name="surname" /><br/>
	BIRTHDATE: <input type="text" name="birthdate" id="datepicker"/><br/>

<!--p>Format options:<br />
	<select id="format">
		<option value="dd/mm/yy">Default - dd/mm/yy</option>
		<option value="dd-M-yy">ISO 8601 - dd-M-yy</option>
	</select>
</p-->
	
	BLOOD_GROUP: <select name="bloodgroup">
			<option selected value=''>Select Blood group</option>
			<option value='O'>O</option>
			<option value='A'>A</option>
			<option value='B'>B</option>
			<option value='AB'>AB</option>
			</select><br/>
	AGE: <input type="text" name="age" /><br/>
	GENDER:<select name="gender">
			<option selected value=''>Select Gender</option>
			<option value='F'>Female</option>
			<option value='M'>Male</option>
			</select><br/>


	DOCTOR_ID: <input type="text" name="doctorid" /><br/>
	<center><input type="submit" /></center>
	
</form>

</td></tr>
</table>

<script>
	$(function() {
		$( "#datepicker" ).datepicker({
			dateFormat:'dd-M-yy'
		});
		//$( "#format" ).change(function() {
		//	$( "#datepicker" ).datepicker( "option", "dateFormat", $( this ).val() );
		//});
	});
	</script>


</body>
</html>
